package edu.byu.intex2.data.dao;

import edu.byu.intex2.data.dao.*;
import java.util.*;

/*******************************************************************************
 *
 *        @author Adam
 *          Date: Mar 3, 2009
 *   Description:
 * Last Revision: Mar 3, 2009
 *
 ******************************************************************************/

public class TaskCC extends BusinessObject {
    
    private double labortime = 0.0;
    private String taskID = null;
    private String concCarID = null;
    private String[] Titles = {"Labor Time", "Task ID", "Conceptual Car ID"};

    /** Creates a new instance of the BO */
    public TaskCC(String id) {
      super(id);
    }

    /** Convenience method to call the correct DAO to save this business object */
    public void save() throws DataException {
      TaskCCDAO.getInstance().save(this);
    }

    /** Returns a string representation of the object */
    public String toString() {
      return getId();
    }

    public ArrayList toTable() {
        ArrayList data = new ArrayList();
        data.add(id);
        data.add(getLabortime());
        data.add(getTaskID());
        data.add(getConcCarID());
        return data;
    }

    /**
     * @return the Dealership
     */
    public String[] getTitles() {
        return Titles;
    }

    /**
     * @return the labortime
     */
    public double getLabortime() {
        return labortime;
    }

    /**
     * @param labortime the labortime to set
     */
    public void setLabortime(double labortime) {
        this.labortime = labortime;
        this.setDirty();
    }

    /**
     * @return the taskID
     */
    public String getTaskID() {
        return taskID;
    }

    /**
     * @param taskID the taskID to set
     */
    public void setTaskID(String taskID) {
        this.taskID = taskID;
        this.setDirty();
    }

    /**
     * @return the concCarID
     */
    public String getConcCarID() {
        return concCarID;
    }

    /**
     * @param concCarID the concCarID to set
     */
    public void setConcCarID(String concCarID) {
        this.concCarID = concCarID;
        this.setDirty();
    }

}//class
